//package xiangmu.schoolpaper.controller.system;
//
//
//import io.swagger.v3.oas.annotations.Operation;
//import io.swagger.v3.oas.annotations.tags.Tag;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RequestParam;
//import org.springframework.web.bind.annotation.RestController;
//import xiangmu.schoolpaper.exception.ContentNullException;
//import xiangmu.schoolpaper.pojo.VO.*;
//import xiangmu.schoolpaper.result.Result;
//import xiangmu.schoolpaper.service.system.GetTeachersService;
//import xiangmu.schoolpaper.service.system.PredictionKeywordsService;
//import xiangmu.schoolpaper.service.system.StatisticAnalysisService;
//
//import java.util.List;
//
//@RestController
//@RequestMapping("/system/sa")
//@Slf4j
//@Tag(name = "管理员端——统计分析")
//public class StatisticAnalysisController {
//    @Autowired
//    private StatisticAnalysisService statisticAnalysisService;
//
//    @Autowired
//    private PredictionKeywordsService predictionKeywordsService;
//
//    @Autowired
//    private GetTeachersService getTeachersService;
//
//
////    @Operation(summary = "1获取所有毕业年份——统计分析")
////    @GetMapping("/get-all-years")
////    public Result<List<Integer>> getAllCompletionYearsSA(){
////        log.info("获取所有毕业年份");
////        List<Integer> list = predictionKeywordsService.getAllCompletionYears();
////        return Result.success(list);
////    }
////
////    @Operation(summary = "2获取所有专业名称——统计分析")
////    @GetMapping("/get-all-majors")
////    public Result<List<String>> getAllMajorsSA(){
////        log.info("获取所有专业名称");
////        List<String> list = predictionKeywordsService.getAllMajors();
////        return Result.success(list);
////    }
////
////    @Operation(summary = "3获取所有老师姓名")
////    @GetMapping("/get-all-teachers")
////    public Result getAllTeachersSA(){
////        log.info("获取所有指导教师的名字");
////        List<String> list = getTeachersService.getAllTeachers();
////        return Result.success(list);
////    }
//
////    @Operation(summary = "4某年份下所有专业")
////    @GetMapping("/get-all-majors-by-year")
//    //已测完
//
////    @Operation(summary = "5某年份下所有老师")
////    @GetMapping("/get-all-teachers-by-year")
//    //已测完
////    @Operation(summary = "6某专业下所有年份")
////    @GetMapping("/get-all-years-by-major")
//    //已修复bug，已测试
////    @Operation(summary = "7某老师下所有年份")
////    @GetMapping("/get-all-years-by-teacher")
//    //已修复bug，已测试
//    //@Operation(summary = "8某年份下所有专业")
//    //已修复bug，已测试
//
//////    111年份单选-专业单选
//////    111-1概览情况
////    @Operation(summary = "8年份单选-专业单选_概览")
////    @GetMapping("/one-year-one-major-view")
////    public Result<SystemSA111viewVO> oneYearOneMajorView(
////            @RequestParam Integer graduationYear,
////            @RequestParam String majorName
////    ) {
////        log.info("111年份单选-专业单选_概览");
////        SystemSA111viewVO vo = statisticAnalysisService.oneYearOneMajorView(graduationYear, majorName);
////        return Result.success(vo);
////    }
//////    111-2图表区域
////    @Operation(summary = "9年份单选-专业单选_图表")
////    @GetMapping("/one-year-one-major-chart")
////    public Result<SystemSA111ChartVO> oneYearOneMajorChart(
////            @RequestParam Integer graduationYear,
////            @RequestParam String majorName
////    ) {
////        SystemSA111ChartVO vo = statisticAnalysisService.oneYearOneMajorChart(graduationYear, majorName);
////        return Result.success(vo);
////    }
//////    112-1年份单选-专业多选
////    @Operation(summary = "10年份单选-专业多选")
////    @GetMapping("/one-year-multi-major")
////    public Result oneYearMultiMajor(@RequestParam Integer graduationYear,@RequestParam List<String> majorNames){
////        log.info("112年份单选-专业多选");
////        //这里的majorNames是一个字符串集合，里面是多个专业名称
////        //前端传的时候 majorNames是一个字符串，里面是多个专业名称，用逗号隔开；例子：软件工程,计算机科学与技术
////        //后端接受majorNames集合，是{"软件工程","计算机科学与技术"}
////        List<String> rew = majorNames.stream()
////                .map(s -> s.replaceAll("\"|\\[|\\]|\\s", "")) // 去除引号、中括号以及在去除引号的时候的空格
////                .toList();
////        SystemSA112ViewVO vo = statisticAnalysisService.oneYearMultiMajor(graduationYear, rew);
////        if(vo.getMajorCount() ==0 || vo.getPassMajorCount() == 0){
////            throw  new ContentNullException("没有数据");
////        }
////        return Result.success(vo);
////    }
////    //112-2图表区域
////    @Operation(summary = "11年份单选-专业多选_图表")
////    @GetMapping("/one-year-multi-major-chart")
////    public Result oneYearMultiMajorChart(@RequestParam Integer graduationYear,@RequestParam List<String> majorNames){
////        log.info("112年份单选-专业多选_图表");
////        List<String> rew = majorNames.stream()
////                .map(s -> s.replaceAll("\"|\\[|\\]|\\s", "")) // 去除引号、中括号以及在去除引号的时候的空格
////                .toList();
////        List<SystemSA112ChartVO> vo = statisticAnalysisService.oneYearMultiMajorChart(graduationYear, rew);
////        if(vo.isEmpty()){
////            throw new ContentNullException("没有数据");
////
////        }
////        return Result.success(vo);
////    }
//////    121-1年份单选-老师单选
////    @Operation(summary = "12年份单选-老师单选")
////    @GetMapping("/one-year-one-teacher")
////    public Result oneYearOneTeacher(@RequestParam Integer graduationYear,@RequestParam String teacherAccount){
////        log.info("121年份单选-老师单选");
////        SystemSA121viewVO vo= statisticAnalysisService.oneYearOneTeacher(graduationYear, teacherAccount);
////        if(vo.getPassCount() ==0 || vo.getStudentCount() == 0){
////            throw  new ContentNullException("没有数据");
////        }
////        return Result.success(vo);
////    }
////    //121-2图表区域
////    @Operation(summary = "13年份单选-老师单选_图表")
////    @GetMapping("/one-year-one-teacher-chart")
////    public Result oneYearOneTeacherChart(@RequestParam Integer graduationYear,@RequestParam String teacherAccount){
////        log.info("121年份单选-老师单选_图表");
////        List<SystemSA121ChartVO> vo = statisticAnalysisService.oneYearOneTeacherChart(graduationYear, teacherAccount);
////        if(vo.isEmpty()){
////            throw new ContentNullException("没有数据");
////        }
////        return Result.success(vo);
////    }
////    122年份单选-老师多选
////    122-1年份单选-老师多选
////    @Operation(summary = "14年份单选-老师多选")
////    @GetMapping("/one-year-one-teacher-multi")
////    public Result oneYearOneTeacherMulti(@RequestParam Integer graduationYear,@RequestParam String teacherAccount){
////        log.info("122年份单选-老师多选");
////        SystemSA122ViewVO vo = statisticAnalysisService.oneYearOneTeacherMulti(graduationYear, teacherAccount);
////        if(vo.getPassCount() ==0 || vo.getTeacherCount()==0){
////            throw  new ContentNullException("符合条件的数据为空，请重新选择查询条件");
////        }
////        return Result.success(vo);
////    }
////    //122-2图表区域
////    @Operation(summary = "15年份单选-老师多选_图表")
////    @GetMapping("/one-year-one-teacher-multi-chart")
////    public Result oneYearOneTeacherMultiChart(@RequestParam Integer graduationYear,@RequestParam String teacherAccount){
////        log.info("122年份单选-老师多选_图表");
////        SystemSA122ChartVO vo =statisticAnalysisService.oneYearOneTeacherMultiChart(graduationYear, teacherAccount);
////
////        return Result.success(vo);
////    }
////    22-1专业单选-年份多选
////    @Operation(summary = "22专业单选-年份多选")
////    @GetMapping("/one-major-multi-year")
////    public Result oneMajorMultiYear(@RequestParam String majorName,@RequestParam String graduationYear){
////        log.info("21专业单选-年份单选");
////
////        SystemSA22ViewVO vo = statisticAnalysisService.oneMajorMultiYear(majorName, graduationYear);
////        if(vo.getPassCount()==0|| vo.getYearCount()==0){
////            throw new ContentNullException("符合条件的数据为空，请重新选择查询条件");
////        }
////        return Result.success(vo);
////    }
//    //22-2图表区域
////    @Operation(summary = "22专业单选-年份多选_图表")
////    @GetMapping("/one-major-multi-year-chart")
////    public Result oneMajorMultiYearChart(@RequestParam String majorName,@RequestParam String  graduationYear){
////        log.info("22专业单选-年份多选_图表");
////        SystemSA22ChartVO vo = statisticAnalysisService.oneMajorMultiYearChart(majorName, graduationYear);
////        return Result.success(vo);
////    }
//
////    32-1老师单选-年份多选
////    @Operation(summary = "32老师单选-年份多选")
////    @GetMapping("/one-teacher-multi-year")
////    public Result oneTeacherMultiYear(@RequestParam String teacherAccount,@RequestParam String graduationYear){
////        log.info("32老师单选-年份多选");
////
////        SystemSA32ViewVO list= statisticAnalysisService.oneTeacherMultiYear(teacherAccount, graduationYear);
////        if(list.getPassCount()==0|| list.getYearCount()==0){
////            throw new ContentNullException("符合条件的数据为空，请重新选择查询条件");
////        }
////        return Result.success(list);
////    }
//    //32-2图表区域
////    @Operation(summary = "32老师单选-年份多选_图表")
////    @GetMapping("/one-teacher-multi-year-chart")
////    public Result oneTeacherMultiYearChart(@RequestParam String teacherAccount,@RequestParam String  graduationYear){
////        log.info("32老师单选-年份多选_图表");
////
////        SystemSA32ChartVO vo = statisticAnalysisService.oneTeacherMultiYearChart(teacherAccount, graduationYear);
////        return Result.success(vo);
////    }
//}
